package com.lwlk.zdk.mapper.pw;

import com.lwlk.zdk.model.Encapsulation.EncapsulationIsAnswerIssue;
import com.lwlk.zdk.model.pw.pwCheckTheDutyMessage;
import com.lwlk.zdk.model.pw.pwCheckTheDutyMessageExample;
import com.lwlk.zdk.model.pw.pwMessage;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface pwCheckTheDutyMessageMapper {
    int countByExample(pwCheckTheDutyMessageExample example);

    int deleteByExample(pwCheckTheDutyMessageExample example);

    int deleteByPrimaryKey(Integer msgId);

    int insert(pwCheckTheDutyMessage record);

    int insertSelective(pwCheckTheDutyMessage record);

    List<pwCheckTheDutyMessage> selectByExample(pwCheckTheDutyMessageExample example);

    pwCheckTheDutyMessage selectByPrimaryKey(Integer msgId);

    int updateByExampleSelective(@Param("record") pwCheckTheDutyMessage record, @Param("example") pwCheckTheDutyMessageExample example);

    int updateByExample(@Param("record") pwCheckTheDutyMessage record, @Param("example") pwCheckTheDutyMessageExample example);

    int updateByPrimaryKeySelective(pwCheckTheDutyMessage record);

    int updateByPrimaryKey(pwCheckTheDutyMessage record);

    List<Map<String,Object>> selectIsAnswerIssue(@Param("roleType")String roleType, @Param("contentType") Integer contentType,
                                                 @Param("startTime")String startTime, @Param("endTime")String endTime,
                                                 @Param("uId")Integer uId,@Param("platformIds")Integer platformIds,@Param("objectType") String objectType);

    int insertBach(pwCheckTheDutyMessage pwCheckTheDutyMessage);

    int updateAccessCode(@Param("accessCode") String accessCode, @Param("uuid") String uuid, @Param("s") String s);

    int updateContent(@Param("updateTime") Date updateTime, @Param("msgId") Integer msgId, @Param("content") String content);

    List<Map<String,Object>> selectYesterday(Date yesterday);

    List<Map<String,Object>> selectResponse(Date yesterday);

    List<Map<String, Object>> selectLastWeek(Date lastMonday, Date lastWeekend);

    List<Map<String, Object>> selectResponseLastWeek(Date lastMonday, Date lastWeekend);

    List<Map<String, Object>> selectLastMonth(Date first, Date end);

    List<Map<String, Object>> selectEndMonth(Date first, Date end);

    List<Map<String, Object>> selectEnterprisePost(@Param("yesterday") Date yesterday, @Param("platformId") int platformId);

    List<Map<String, Object>> selectEnterpriseResponse(@Param("yesterday") Date yesterday, @Param("platformId") int platformId);

    List<Map<String, Object>> selectEnterpriseResponseWeek(@Param("lastMonday") Date lastMonday, @Param("lastWeekend") Date lastWeekend, @Param("platformId") int platformId);

    List<Map<String, Object>> selectEnterpriseWeekCount(@Param("lastMonday") Date lastMonday, @Param("lastWeekend") Date lastWeekend, @Param("platformId") int platformId);

    List<Map<String, Object>> selectEnterpriseMonth(@Param("first") Date first, @Param("end") Date end, @Param("platformId") int platformId);

    List<Map<String, Object>> selectEnterpriseResponseMonth(@Param("first") Date first, @Param("end") Date end, @Param("platformId") int platformId);

    List<pwMessage> selectDim(@Param("platformId") String platformId, @Param("startTime") Date startTime, @Param("isReply") Integer isReply, @Param("endTime") Date endTime);

    List<Map<String, Object>> selectPlatformDetail(@Param("platformId") Integer platformId, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("isReply") Integer isReply);

    int updateObjectType(@Param("msgId") Integer msgId, @Param("objectId") String objectId);

    List<Map<String, Object>> selectMsgId(@Param("megId") Integer megId);

    List<Map> selectMessageDetails(@Param("messageId") Integer messageId);

    List<Map<String, Object>> selectPlatformRecord(@Param("uId") Integer uId, @Param("platformId") Integer platformId, @Param("checkTime") String checkTime);
}